package com.eagle.scali.usercenter.controller;

import com.eagle.scali.usercenter.domain.entity.user.User;
import com.eagle.scali.usercenter.service.user.UserService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


@RestController
@RequiredArgsConstructor(onConstructor = @__(@Autowired))
@Slf4j
public class TestController {

	/**
	 * get请求
	 * http://localhost:8040/q?id=1&wxId=aaa
	 *
	 * @param user
	 * @return
	 */
	@GetMapping("/q")
	public User query(User user) {
		return user;
	}

	/**
	 * post请求
	 * http://localhost:8040/p
	 *
	 * @param user
	 * @return
	 */
	@PostMapping("/p")
	public User post(@RequestBody User user) {
		return user;
	}


}
